import requests
from bs4 import BeautifulSoup
import xlwt
book = xlwt.Workbook(encoding="utf-8")

headers = {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
}
r = requests.get("https://cd.58.com/",headers=headers)
r.encoding = "uft-8"
print(r)
print(r.headers)
print(r.history)
#print(r.text)
soup = BeautifulSoup(r.text,"html.parser")
#print(soup.prettify())
print(soup.find_all("input","keyword"))
print(soup.find_all("input",attrs={
    "class":"keyword"
}))
print(soup.select("#searchbtn"))

